package com.itheima.d3_final;

/**
 * 记住final
 */
public class Test {

    public static final String school_Name ="黑马";

    public static void main(String[] args) {
        final double PI = 3.14;
        final Teacher t = new Teacher();
        t.setHobby("鼓励");
        System.out.println(t.getHobby());
        t.setHobby("考试");
        System.out.println(t.getHobby());
    }
    public static void buy(final double discount){

    }
}
// final修饰引用类型变量，地址值不能改变，但指向的内容可以改变
class Teacher{
    private  String hobby;

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }
}
